package design.observer;


/**
 * @author ZH
 */
public class Test2 {
    public static void main(String[] args) throws Exception {
        GraphicCard card = new GraphicCard();
        for (int i = 0; i < 3; i++) {
            Consumer consumer = new Consumer(i+"号消费者");
            card.addObserver(consumer);
        }
        card.priceChange(5000);
        card.priceChange(6000);
        card.priceChange(1000);
    }
}
